﻿// MIT License
// 开源地址：https://gitee.com/co1024/AbcMvc
// Copyright (c) 2021-2023 1024
// Abc.Mvc=Furion+EF+SqlSugar+Pear layui admin.

namespace Abc.Core.Entities;

/// <summary>
/// 邮件发送模板
/// </summary>
[Comment("邮件发送模板")]
[Table("Sys_EmailSendTemplate")]
[SugarIndex("Index_{table}_CreationTime", nameof(CreationTime), OrderByType.Desc)]
public class SysEmailSendTemplate : FullEntityNoIdentity, IExtensionData
{
    /// <summary>
    /// Json数据 
    /// </summary>
    [SugarColumn(ColumnDescription = "扩展字段", ColumnDataType = StaticConfig.CodeFirst_BigString, IsJson = true, IsNullable = true)]
    public Dictionary<string, object>? ExtensionData { get; set; }

    /// <summary>
    ///邮件发送模板类型
    /// </summary>
    [Comment("邮件发送模板类型")]
    public EmailSendTemplateType TemplateType { get; set; }

    /// <summary>
    /// 是否启用.
    /// </summary>
    [Comment("是否启用")]
    public bool IsEnable { get; set; }

    /// <summary>
    /// 邮件标题
    /// </summary>
    [Comment("邮件标题")]
    [MaxLength(500)]
    public string Title { get; set; }

    /// <summary>
    /// 邮件内容
    /// </summary>
    [Comment("邮件内容")]
    public string Content { get; set; }


    /// <summary>
    /// 编号
    /// </summary>
    [Comment("编号")]
    public string Code { get; set; }
    /// <summary>
    /// 是否验证码
    /// </summary>
    [Comment("是否需验证码")]
    public bool IsVerCode { get; set; }

    #region ref

    /// <summary>
    /// 表ID
    /// </summary>
    [Comment("表ID")]
    public long? TableId { get; set; }

    #endregion ref
}